# !/usr/bin/env python
# -*- coding: utf-8 -*-
"""
 -------------------------------------------------
    File Name:     suite_runner.py
    Description:   测试集合运行逻辑

    测试集合是多个测试用例的组合，通常根据某种逻辑（例如功能模块、场景优先级）组织起来。
 -------------------------------------------------
 """

# from utils.yaml_loader import load_yaml
from apitesting.common.file.yaml_handler import yaml_handler
from apitesting.src.executors.test_executor import execute_test_case


def run_test_suite(test_suite_path):
    test_suite = yaml_handler.yaml_handler(test_suite_path)

    for test_case in test_suite["test_cases"]:
        print(f"Running test case: {test_case['case_name']}")
        execute_test_case(test_case)

